<!DOCTYPE html>
<html>
	<head>
		<meta name="viewport" content="width=device-width,initial-scale=1.0" />
		<meta charset="utf-8" />

		<script src="__PUBLIC__/Home/js/jquery-1.8.3.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="__PUBLIC__/Home/js/jquery.mobile-1.4.5.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="__PUBLIC__/Home/js/bootstrap.js" type="text/javascript" charset="utf-8"></script>
		<script src="__PUBLIC__/Home/js/qrcode.js" type="text/javascript" charset="utf-8"></script>
		<!--<script src="__PUBLIC__/Home/js/index.js" type="text/javascript" charset="utf-8"></script>-->
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/Home/css/index.css"/>

		<link rel="stylesheet" type="text/css" href="__PUBLIC__/Home/css/font-awesome.css"/>
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/Home/css/bootstrap.css"/>

		<link rel="stylesheet" type="text/css" href="__PUBLIC__/Home/css/weui.min.css"/>
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/Home/css/weui.css"/>

		<title>瑜伽馆预约</title>
	</head>
	<style media="screen">

	</style>
	<body>

		<div data-role="page">
		  <div class="page">
			<div class="top">
				<a href=""><img src="__PUBLIC__/Home/img/home.png"/></a>
				<span>/</span>
				<a href="" class="sport">瑜伽馆课程</a>
			</div>
			<!---->
				<div class="jumbotron" style="padding:1em 0;background-color: #FFFFFF;">
	<span id="status" style="display:none"></span>
	<!--预约成功提示-->
	<div class="alert alert-dismissable alert-success" style="display:none;text-align:center;font-weight:600" id="alert">
	</div>


<table class="table" style="width:100%">
	<php>
		$nt = strtotime(I('time')?I('time'):date("Y-m-d",time()))+86400;
		$yt = strtotime(I('time')?I('time'):date("Y-m-d",time()))-86400;

			$ntime = date("Y-m-d",$nt);
			$ytime = date("Y-m-d",$yt);
	</php>

<caption>
<div class="col-xs-4">
	<a href="{:U('index',array('time'=>date("Y-m-d",strtotime($ytime))))}" target="_top"  class="weui_btn weui_btn_plain_primary"style="width:3em ; border-radius : 1em"><span class="glyphicon glyphicon-chevron-left"></span></a>
</div>

<div class="col-xs-4" style="font-size: 0.5em;text-align: center;">
<span id="todayDate">
<php>if(I('time')){</php>
	{:I('time')}
<php>}else{</php>
	{:date("Y-m-d",time())}
<php>}</php>
</span><br>
<php>if(I('time')){
	$weekcn = getcnweek(I('time'));
}else{
	$weekcn = getcnweek(date("Y-m-d",time()));
}</php>
	{$weekcn}
</div>

<div class="col-xs-4">

<a href="{:U('index',array('time'=>date("Y-m-d",strtotime($ntime))))}" target="_top"  class="weui_btn weui_btn_plain_primary"style="width:3em ; border-radius : 1em"><span class="glyphicon glyphicon-chevron-right"></span></a>
</div>

</caption>
<tbody>    
	<volist name="data" id="v">
		<tr style="background-color:{$v.color}">
		<td style="text-align:center;padding:10px 2px;width:15%"><h5 style="color:#333333"><b>{$v.start_time|substr="10"}</b></h5></td>
		<td style="padding:0.5em;vertical-align:middle;width:70%">
		<h5 style="margin-top:0.5em;margin-bottom:0.5em;font-size:1em;color:#333333;"><b>
			{$v.course_id|getcoursename}
			</b></h5>
		<p style="margin-top;0.4em;margin-bottom:0.3em;font-size:0.8em;font-weight:300;color:#666666">老师:{$v.teacher_id|getteacher}	&nbsp;&nbsp;&nbsp;&nbsp;
		时长:<php> $sc = mintime($v['course_date'],$v['course_time']);</php>{$sc}'
		<br>
		结束时间：{$v.course_time|substr="10"}		</p>
			</td>
							<td style="vertical-align:middle;padding-right:0.8em;width:18%;">
								<if condition="get_sy_class($v['course_id']) gt 0 ">

									<button class="weui_btn weui_btn_mini weui_btn_primary" onclick="yuyue({$v.id})" style="width:4.5em;height:2.5em;cursor:pointer" class_id="{$v.id}" name="bookBtn">
												余&nbsp;{$v.course_id|get_sy_class}</button>
								</if>

							</td>
						</tr>
	</volist>


			</tbody></table>




<div class="btn-group btn-group-justified" style=";margin:0 auto 1em auto;">
  <a href="{:U('weekindex')}" target="_top" class="btn btn-success">整周课表
  </a>
	<a href="{:U('quxiao')}"  target="_top" class="btn btn-warning">取消预约</a>
  <!--<a href="http://bookonline.wendaosoft.com/bookonline/index.php/weiweb/book/history/9001" class="btn btn-warning">取消预约</a>-->
  <a data-toggle="modal" data-target="#myqrcode" onclick="$('#book_div1').toggle()" class="btn btn-info">二维码卡号</a>
</div>

<br>
<div class="panel panel-success" style="margin:1em">
	<div class="panel-heading">
		<div class="panel-title">课程预约说明</div>
	</div>
	<div class="panel-body">
		<div>1、可限制每月最大爽约次数，超出则不能预约当月课程；<div>2、可限制取消预约的时间在课程开始前多少分钟，在此时间范围内，将不可以取消课程预约；</div><div>3、可以限制会员预约课程的时间，例如可限制只能预约三天内的课程；</div><div>4、可设置候补预约，当人数已满后，会员候补排队。</div></div>
	</div>
</div>

<!-- <div class="panel panel-success" style="margin:1em">
	<div class="panel-heading">
		<div class="panel-title">等级说明</div>
	</div>
	<div class="panel-body">
				<span>基础</span> : <span></span><br>
			</div>
</div> -->
<input type="hidden" id="maxMissCheckNums" value="9">

<div class="modal" id="book_div1">
  <div class="modal-dialog">
	<div class="modal-content" id="erweicode" style="text-align: -webkit-center;">


	</div>
  </div>
</div>


<!--
	<div class="baoming">
		<input type="hidden" name="course_id" value="{$data['id']}">
		<h4>我要报名</h4>
		<div class="baoming_content">
			<div class="baoming_left">手机</div>
			<input type="text" placeholder="必填" name="yueyu_tel"/>
		</div>
		<div class="baoming_content">
			<div class="baoming_left">姓名</div>
			<input type="text" placeholder="必填" name="yueyu_name"/>
		</div>
		<div class="baoming_content">
			<div class="baoming_left">留言</div>
			<input type="text"  name="yueyu_comment"/>
		</div>
		<button class="queren" type="submit " class="btn btn-default">确认报名</button>
	</div>
-->


<div class="modal" id="book_div">
  <div class="modal-dialog">
	<div class="modal-content">
	  <div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true" style="font-size:2em">×</button>
		<h4 class="modal-title">请输入信息</h4>
	  </div>
	  <div class="modal-body">
		<form  action="{:U('add')}" class="form-horizontal" target="_top" method="post">

		<input type="hidden" name="id" id="bookClassid">
				<div class="input-group">
			<span class="input-group-addon">手机号码</span>
			<input type="tel" class="form-control" name="yueyu_tel" id="mobile" value="" placeholder="必填">
		</div>
		<br>
		<div class="input-group">
			<label class="input-group-addon">您的姓名</label>
			<input type="text" class="form-control" name="yueyu_name" id="userName" value="">
		</div>
		<br>
		<div class="input-group">
			<label class="input-group-addon">预约备注</label>
			<input type="text" class="form-control" name="yueyu_comment" id="bookNote">
		</div>
			  </form></div>
	  <div class="modal-footer">
		<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
		<button type="button" class="btn btn-success" id="bookButton" style="cursor:pointer">确认预约</button>
	  </div>

	</div>
  </div>
</div>





<script>
	$(document).ready(function () {
        var qrcode = new QRCode('erweicode', {
            text: "{$urlcode}",
            width: 256,
            height: 256,
            colorDark : '#000000',
            colorLight : '#ffffff',
            correctLevel : QRCode.CorrectLevel.H
        });

        $("#erweicode").children("img").css("margin","40px");

        $("#book_div1").click(function () {
			$(this).hide();
        })
    })
function yuyue(i) {
	$("#bookClassid").val("");
	$("#book_div").show();
	$("#bookClassid").val(i);
}
$(function(){

	$(".btn-default,.close").click(function() {
		$("#book_div").hide();
	})

	$("#bookButton").click(function() {
		$(".form-horizontal").submit();
	})
})
</script>


			<hr>

</div>
			<!---->


			  <include file="Common/main" />
		    </div>
		</div>



	</body>
</html>
